home *** CD-ROM | disk | FTP | other *** search
- global gSpeedometerInfo, gCurrentVel, gCamera, gSpriteScale
-
- on updateSpeedometer
- theSpeed = gCurrentVel.magnitude
- maxSpeed = 1600.0
- propSpeed = theSpeed / maxSpeed
- theDegree = (180 * propSpeed) - 90
- if theDegree > 95 then
- theDegree = 95
- end if
- radTurn = theDegree * (PI / 180)
- leftAmount = 64 * sin(radTurn) * 0.80000000000000004 * gSpriteScale
- upAmount = 64 * -cos(radTurn) * 0.80000000000000004 * gSpriteScale
- gCamera.overlay[gSpeedometerInfo.num].rotation = theDegree
- gCamera.overlay[gSpeedometerInfo.num].loc = gSpeedometerInfo.centerLoc + point(leftAmount, upAmount)
- end
-